<li id="member-<%= member.id %>" class="repository-member list-item list-avatar">
  <div class="avatar-box">
    <%= user_avatar_tag(member.user, style: :medium) %>
  </div>
  <div class="title text-overflow"><%= link_to member.user.name, member.user.to_path %></div>
  <div class="description"><%= user_name_tag(member.user) %></div>
  <% if can? :manage, @repository %>
    <% if member.user_id != current_user.id %>
      <%= form_for(member, url: collaborator_user_repository_settings_path, remote: true, method: :post, html: {
        class: "edit-member" }) do |f| %>
          <%= f.hidden_field :id %>
          <details class="details-reset details-overlay d-inline-block position-relative">
            <summary class="btn btn-sm select-menu-button"><%= member.role_name %></summary>
            <details-menu class="select-menu-modal">
              <div class="select-menu-list">
                <% Member.role_options.each do |label, value| %>
                <button class="select-menu-item" name="member[role]" value="<%= value %>" type="submit">
                  <div class="select-menu-item-icon"><%= icon_tag("check") if member.role == value %></div>
                  <div class="select-menu-item-text js-select-button-text">
                    <%= label %>
                  </div>
                </button>
                <% end %>
              </div>
            </details-menu>
          </details>
        <% end %>
      <%= form_for(member, url: collaborator_user_repository_settings_path, remote: true, method: :delete, html: {
        class: "delete-member"
      }) do |f| %>
        <%= f.hidden_field :id %>
        <button type="submit" class="btn-link btn-danger" data-confirm="<%= t(".Are you sure to remove?") %>"><%= icon_tag("delete") %></button>
      <% end %>
    <% end %>
  <% end %>
</li>